//
//  UserInfo.m
//  智慧小区
//
//  Created by lab603 on 15/6/29.
//  Copyright (c) 2015年 Dreamsoul. All rights reserved.
//

#import "UserInfo.h"

@implementation UserInfo
+ (NSDictionary *)replacedKeyFromPropertyName{
    return @{@"ID" : @"id"};
}
- (id)initWithCoder:(NSCoder *)decoder{
    self = [super init];
    if (!self) {
        return nil;
    }
    _ID = [decoder decodeObjectForKey:@"ID"];
    _icon = [decoder decodeObjectForKey:@"icon"];
    _age= [decoder decodeObjectForKey:@"age"];
    _job = [decoder decodeObjectForKey:@"job"];
    _name = [decoder decodeObjectForKey:@"name"];
    _room = [decoder decodeObjectForKey:@"room"];
    _sex = [decoder decodeObjectForKey:@"sex"];
    _dbName = [decoder decodeObjectForKey:@"dbName"];
    _community = [decoder decodeObjectForKey:@"community"];
    _account = [decoder decodeObjectForKey:@"account"];
    _password = [decoder decodeObjectForKey:@"password"];
    _isRemember = [decoder decodeBoolForKey:@"isRemember"];
    return self;
}

- (void)encodeWithCoder:(NSCoder *)encoder{
    [encoder encodeObject:_ID forKey:@"ID"];
    [encoder encodeObject:_icon forKey:@"icon"];
    [encoder encodeObject:_age forKey:@"age"];
    [encoder encodeObject:_job forKey:@"job"];
    [encoder encodeObject:_name forKey:@"name"];
    [encoder encodeObject:_room forKey:@"room"];
    [encoder encodeObject:_sex forKey:@"sex"];
    [encoder encodeObject:_dbName forKey:@"dbName"];
    [encoder encodeObject:_community forKey:@"community"];
    [encoder encodeObject:_account forKey:@"account"];
    [encoder encodeObject:_password forKey:@"password"];
    [encoder encodeBool:_isRemember forKey:@"isRemember"];
}

@end
